package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:26 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductVersionMilestoneBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductVersionMilestone productVersionMilestone;

  protected BeanMap getBeanMap() {

    return new BeanMap(productVersionMilestone);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.Id);

    mappedDaoFields.put(
        "productVersionId",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ProductVersionId);

    mappedDaoFields.put(
        "milestoneName",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.MilestoneName);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.SortIndex);

    mappedDaoFields.put(
        "startDate", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.StartDate);

    mappedDaoFields.put(
        "endDate", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.EndDate);

    mappedDaoFields.put(
        "actualStartDate",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ActualStartDate);

    mappedDaoFields.put(
        "actualEndDate",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ActualEndDate);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.Remarks);

    mappedDaoFields.put(
        "productVersionName",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ProductVersionName);

    mappedDaoFields.put(
        "productVersionStartDate",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ProductVersionStartDate);

    mappedDaoFields.put(
        "productVersionEndDate",
        com.ourteam.product.requirement.dao.IProductVersionMilestoneDAO.ProductVersionEndDate);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductVersionMilestoneBean() {
    super();

    this.productVersionMilestone =
        new com.ourteam.product.requirement.dao.ProductVersionMilestone();
  }

  public ProductVersionMilestoneBean(
      com.ourteam.product.requirement.dao.ProductVersionMilestone productVersionMilestone) {
    super();

    this.productVersionMilestone = productVersionMilestone;
  }

  public com.ourteam.product.requirement.dao.ProductVersionMilestone
      convertToProductVersionMilestone() {
    return this.productVersionMilestone;
  }

  public com.ourteam.product.requirement.dao.ProductVersionMilestone convertTo() {
    return this.productVersionMilestone;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productVersionMilestone.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productVersionMilestone.setId(id);
  }

  /**
   * Get productVersionId
   *
   * @return long
   */
  public long getProductVersionId() {
    return (long) this.productVersionMilestone.getProductVersionId();
  }

  /**
   * Set productVersionId
   *
   * @parameter long
   */
  public void setProductVersionId(long productVersionId) {

    this.productVersionMilestone.setProductVersionId(productVersionId);
  }

  /**
   * Get milestoneName
   *
   * @return String
   */
  public String getMilestoneName() {
    return (String) this.productVersionMilestone.getMilestoneName();
  }

  /**
   * Set milestoneName
   *
   * @parameter String
   */
  public void setMilestoneName(String milestoneName) {

    this.productVersionMilestone.setMilestoneName(milestoneName);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productVersionMilestone.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productVersionMilestone.setSortIndex(sortIndex);
  }

  /**
   * Get startDate
   *
   * @return java.util.Date
   */
  public java.util.Date getStartDate() {
    return (java.util.Date) this.productVersionMilestone.getStartDate();
  }

  /**
   * Set startDate
   *
   * @parameter java.util.Date
   */
  public void setStartDate(java.util.Date startDate) {

    this.productVersionMilestone.setStartDate(startDate);
  }

  /**
   * Get endDate
   *
   * @return java.util.Date
   */
  public java.util.Date getEndDate() {
    return (java.util.Date) this.productVersionMilestone.getEndDate();
  }

  /**
   * Set endDate
   *
   * @parameter java.util.Date
   */
  public void setEndDate(java.util.Date endDate) {

    this.productVersionMilestone.setEndDate(endDate);
  }

  /**
   * Get actualStartDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualStartDate() {
    return (java.util.Date) this.productVersionMilestone.getActualStartDate();
  }

  /**
   * Set actualStartDate
   *
   * @parameter java.util.Date
   */
  public void setActualStartDate(java.util.Date actualStartDate) {

    this.productVersionMilestone.setActualStartDate(actualStartDate);
  }

  /**
   * Get actualEndDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualEndDate() {
    return (java.util.Date) this.productVersionMilestone.getActualEndDate();
  }

  /**
   * Set actualEndDate
   *
   * @parameter java.util.Date
   */
  public void setActualEndDate(java.util.Date actualEndDate) {

    this.productVersionMilestone.setActualEndDate(actualEndDate);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productVersionMilestone.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productVersionMilestone.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productVersionMilestone.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productVersionMilestone.setRemarks(remarks);
  }

  /**
   * Get productVersionName
   *
   * @return String
   */
  public String getProductVersionName() {

    return (String) this.productVersionMilestone.getProductVersionName();
  }

  /**
   * Get productVersionStartDate
   *
   * @return java.util.Date
   */
  public java.util.Date getProductVersionStartDate() {

    return (java.util.Date) this.productVersionMilestone.getProductVersionStartDate();
  }

  /**
   * Get productVersionEndDate
   *
   * @return java.util.Date
   */
  public java.util.Date getProductVersionEndDate() {

    return (java.util.Date) this.productVersionMilestone.getProductVersionEndDate();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductVersionMilestoneBean) == false) {
      return false;
    } // end if

    ProductVersionMilestoneBean other = (ProductVersionMilestoneBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductVersionMilestone tempProductVersionMilestone =
        other.convertToProductVersionMilestone();

    if (tempProductVersionMilestone == null || this.productVersionMilestone == null) {
      isEqual = false;
    } else if (tempProductVersionMilestone == this.productVersionMilestone
        || tempProductVersionMilestone.equals(this.productVersionMilestone)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductVersionMilestoneBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionMilestone[] aProductVersionMilestones) {

    return toArray(aProductVersionMilestones, null);
  }

  public static ProductVersionMilestoneBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionMilestone[] aProductVersionMilestones,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductVersionMilestones)) {
      return new ProductVersionMilestoneBean[0];
    }

    int length = aProductVersionMilestones.length;

    ProductVersionMilestoneBean[] beans = new ProductVersionMilestoneBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductVersionMilestoneBean(aProductVersionMilestones[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductVersionMilestones[i]});
      }
    }

    return beans;
  }
}
